From 7845e5bb1185df14379b31f928fd2ee31d124c9b Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Mon, 14 Nov 2005 12:28:47 +0100 Subject: [PATCH] Fix check for a working iptables installation. Checking for the iptables binary is not sufficient, because the user may not have the appropriate modules installed. Signed-off-by: Ewan Mellor --- tools/examples/vif-common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/examples/vif-common.sh b/tools/examples/vif-common.sh index c571b8d95b..fe3e6c67d1 100644 --- a/tools/examples/vif-common.sh +++ b/tools/examples/vif-common.sh @@ -76,7 +76,11 @@ function frob_iptable() # function handle_iptable() { - if ! which iptables >&/dev/null + # Check for a working iptables installation. Checking for the iptables + # binary is not sufficient, because the user may not have the appropriate + # modules installed. If iptables is not working, then there's no need to do + # anything with it, so we can just return. + if ! iptables -L >&/dev/null then return fi -- 2.30.2